package com.github.sbb.sherry.console.controller;

import com.github.sbb.sherry.console.service.WelcomeQuoteService;
import com.github.sbb.sherry.repository.entity.WelcomeQuote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/quote")
public class WelcomeQuoteController {

  @Autowired
  private WelcomeQuoteService welcomeQuoteService;

  @GetMapping("random")
  public WelcomeQuote random() {
    return welcomeQuoteService.random();
  }

}
